<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>Maojs</title>
</head>
<body>
	<button id='dialog'>弹出框</button>
	<script type="text/javascript">
		var button = document.getElementById('dialog');
		button.onclick = function(){
			var box_element = document.createElement("div");
			var body_element = document.getElementsByTagName('body')[0];
			box_element.style.width = "200px";
			box_element.style.height = "200px";
			box_element.style.backgroundColor = "red";
			body_element.appendChild(box_element);
		}
		
	</script>
</body>
</html>